package com.yangmao.service.impl;

import com.github.pagehelper.PageHelper;
import com.yangmao.dao.FitnessManagementDao;
import com.yangmao.entity.FitnessManagement;
import com.yangmao.service.api.FitnessManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘洋毛’
 * @version 1.0
 * @description: TODO
 * @date 2022/1/11 16:02
 */
@Service
public class FitnessManagementImpl implements FitnessManagementService {
    @Autowired
    private FitnessManagementDao FitnessManagementdao;

    @Override
    public List<FitnessManagement> getAllFitnessManagement(int page, int size) {
        PageHelper.startPage(page,size);
        return FitnessManagementdao.getAllFitnessManagement();
    }

    @Override
    public void updateFitnessManagement(FitnessManagement FitnessManagement) {
        FitnessManagementdao.updateFitnessManagement(FitnessManagement);
    }

    @Override
    public void deleteFitnessManagement(String id) {
        FitnessManagementdao.deleteFitnessManagement(id);
    }

    @Override
    public void addFitnessManagement(FitnessManagement FitnessManagement) {
        FitnessManagementdao.addFitnessManagement(FitnessManagement);
    }

    @Override
    public FitnessManagement getFitnessManagementById(String id) {
        return FitnessManagementdao.getFitnessManagementById(id);
    }
}
